源码:
#include"pch.h"
#include<iostream>
intmain()
{
//通过IP端口创建协议
autoprotocol = techlego::create_binary_protocol(L"localhost", 5252);
//通过协议创建客户端
autoclient = techlego::h_scan3d_client::make_shared(protocol);
autocalibration_setup = techlego::h_calibration_setup::make_shared();
//设置高精度标定
booluse_high_accuracy = true;
calibration_setup->set_use_high_accuracy(&use_high_accuracy);
//设置是否允许较高噪声
boolallow_noise = true;
calibration_setup->set_allow_noise(&allow_noise);
//设置标定
client->set_calibration_setup(*calibration_setup);
//读取设置,检查是否设置成功
client->get_calibration_setup(*calibration_setup);
//得到是否采用高精度标定模式
constbool* high_accuracy = calibration_setup->get_use_high_accuracy();
if(high_accuracy != nullptr)
{
std::cout <<"高精度标定模式: "<<(*high_accuracy ? "true": "false") <<std::endl;
}
//得到是否允许较高的噪声
constbool* noise = calibration_setup->get_allow_noise();
if(noise != nullptr)
{
std::cout <<"允许较高噪声: "<<(*noise ? "true": "false") <<std::endl;
}
return0;
}